<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    x:Class="OpenLS.Chart.UI.NumericValueResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:chart="http://schemas.Kherty.com/office/2007/chart"
    xmlns:chartui="clr-namespace:OpenLS.Chart.UI"
    xmlns:Internals="clr-namespace:OpenLS.Chart.UI.Internals"
    xmlns:drawing2="clr-namespace:OpenLS.Drawing.UI;assembly=OpenLS.Drawing.UI">
    
    <Style TargetType="{x:Type TextBlock}" x:Key="NumericValueLabelStyle">
        <Setter Property="Background">
            
            <Setter.Value>
                <MultiBinding Converter="{x:Static Internals:ChartConverters.FillPropertiesToBrushConverter}">
                    <Binding RelativeSource="{RelativeSource Self}" Path="(drawing2:DrawingElement.ShapeProperties).FillProperties"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(drawing2:DrawingElement.Theme).ColorScheme"/>
                </MultiBinding>
            </Setter.Value>
        </Setter>
        <Setter Property="Text">
            <Setter.Value>
                <MultiBinding Converter="{x:Static Internals:ChartConverters.FormattingConverter}">
                    <Binding Path="Value"/>
                    <Binding Path="(chartui:AxisElement.Axis).NumericFormat.Format" RelativeSource="{RelativeSource Self}"></Binding>
                    <Binding Path="(chartui:AxisElement.Axis).DisplayUnits.Unit" RelativeSource="{RelativeSource Self}"></Binding>
                    <Binding Path="(chartui:ChartElement.DateTimeConverter)" RelativeSource="{RelativeSource Self}"></Binding>
                </MultiBinding>
            </Setter.Value>
        </Setter>
    </Style>
    <DataTemplate DataType="{x:Type chart:NumericValue}" x:Key="NumericValueLabelTemplate">
        <TextBlock Margin="3 0 6 0" Name="tb" Style="{x:Static chartui:NumericValueResources.NumericValueLabelStyle}">
        </TextBlock>
    </DataTemplate>

    <DataTemplate DataType="{x:Type chart:NumericValue}" >
        <TextBlock Margin="3 0 6 0" Name="tb" Style="{x:Static chartui:NumericValueResources.NumericValueLabelStyle}">
        </TextBlock>
    </DataTemplate>
</ResourceDictionary>